Field of the Invention
The present invention relates to flash memory, and in particular to a method for managing a flash memory and a system thereof.
Description of the Related Art
Flash memory is an electronically erasable and programmable read only memory, allowing data to be erased or written repeatedly in operation, applicable to devices such as memory cards or removable disk drives. The flash memory usually includes various management tables, buffered in a Random Access Memory (RAM) of the flash memory. During access operations to the flash memory, the management tables are utilized and updated in the RAM. The management tables include a logical-to-physical address mapping table which records and manages a corresponding relationship of logical addresses and physical addresses, a bad block table which records bad memory blocks in the flash memory, and the like. Other than the various management tables, the RAM in the flash memory also buffers data used while it is being accessed.
Since the memory space of the RAM in the flash memory is limited, consequently the data size of the buffered management tables and buffered data are also limited. As sizes of flash memories grow, the sizes of the buffered management tables and data also increase accordingly. Simply adopting a larger RAM to resolve the issue will lead to an increase in the manufacturing cost and product dimensions. As a result, a memory management method is needed to increase the memory space for buffering the management tables and data without increasing the manufacturing cost and the product dimensions, controlling and managing the buffered management tables and data under all transfer conditions.